Drilling fluids are often circulated downhole during drilling operations and perform a number of functions, such as lubricating the area being drilled and removing cuttings that are created during drilling. Once the drilling fluids are returned to the surface, the cuttings can be removed and the drilling fluids can be sent back downhole for reuse. Properties of the drilling fluid are typically monitored during drilling operations. For example, it is often desirable to accurately measure gas concentrations in the drilling fluid, such as hydrocarbon gas concentrations, as the drilling fluid leaves the wellbore. The concentration of various gases in the drilling fluid, such as the concentrations of various types of hydrocarbon gas, can provide a valuable warning system when the concentration of certain gases reach unsafe levels, thereby increasing the safety of the drilling rig and safety of the personnel involved in the drilling operation. Further, the concentration of various types of gases in the drilling fluid can be indicative of the characteristics of the formation being drilled and the drilling environment, and can provide information that can affect how the drilling operation is performed.
However, various problems with the drilling fluid system can decrease or completely eliminate the ability to accurately detect various gases and their concentrations. For example, a faulty detector or analyzer, or leaks caused by bad seals or faulty connections that allow atmospheric air into the system, can prevent or reduce the ability to accurately detect various gases or measure their concentration.